package com.naire.modul.contract.service;

import net.common.service.GeneralService;
import com.naire.modul.contract.dao.ContractDao;
import com.naire.modul.contract.dao.impl.ContractDaoImpl;
import com.naire.modul.contract.vo.ContractVo;

/**
 * 
 * 
 * @author Administrator
 * 
 */
public class ContractEditorService extends GeneralService {

	private ContractVo bean;

	@Override
	public void execute() throws Exception {
		ContractDao dao = new ContractDaoImpl();
		if (bean.getContract_id() != null) {
			dao.update(bean);
		} else {
			bean.setFlag(0);
			dao.insert(bean);
		}
	}

	public void setBean(ContractVo bean) {
		this.bean = bean;
	}

}
